package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TLandAssetsAttachMapper;
import com.ruoyi.system.domain.TLandAssetsAttach;
import com.ruoyi.system.service.ITLandAssetsAttachService;
import com.ruoyi.common.core.text.Convert;

/**
 * 土地资产附件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-22
 */
@Service
public class TLandAssetsAttachServiceImpl implements ITLandAssetsAttachService 
{
    @Autowired
    private TLandAssetsAttachMapper tLandAssetsAttachMapper;

    /**
     * 查询土地资产附件信息
     * 
     * @param id 土地资产附件信息主键
     * @return 土地资产附件信息
     */
    @Override
    public TLandAssetsAttach selectTLandAssetsAttachById(Long id)
    {
        return tLandAssetsAttachMapper.selectTLandAssetsAttachById(id);
    }

    /**
     * 查询土地资产附件信息列表
     * 
     * @param tLandAssetsAttach 土地资产附件信息
     * @return 土地资产附件信息
     */
    @Override
    public List<TLandAssetsAttach> selectTLandAssetsAttachList(TLandAssetsAttach tLandAssetsAttach)
    {
        return tLandAssetsAttachMapper.selectTLandAssetsAttachList(tLandAssetsAttach);
    }

    /**
     * 新增土地资产附件信息
     * 
     * @param tLandAssetsAttach 土地资产附件信息
     * @return 结果
     */
    @Override
    public int insertTLandAssetsAttach(TLandAssetsAttach tLandAssetsAttach)
    {
        tLandAssetsAttach.setCreateTime(DateUtils.getNowDate());
        return tLandAssetsAttachMapper.insertTLandAssetsAttach(tLandAssetsAttach);
    }

    /**
     * 修改土地资产附件信息
     * 
     * @param tLandAssetsAttach 土地资产附件信息
     * @return 结果
     */
    @Override
    public int updateTLandAssetsAttach(TLandAssetsAttach tLandAssetsAttach)
    {
        tLandAssetsAttach.setUpdateTime(DateUtils.getNowDate());
        return tLandAssetsAttachMapper.updateTLandAssetsAttach(tLandAssetsAttach);
    }

    /**
     * 批量删除土地资产附件信息
     * 
     * @param ids 需要删除的土地资产附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTLandAssetsAttachByIds(String ids)
    {
        return tLandAssetsAttachMapper.deleteTLandAssetsAttachByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除土地资产附件信息信息
     * 
     * @param id 土地资产附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTLandAssetsAttachById(Long id)
    {
        return tLandAssetsAttachMapper.deleteTLandAssetsAttachById(id);
    }
}
